#include "UdpServer.hpp"
#include "Dict.hpp"
#include <memory>
int main(int argc, char* argv[])
{
    if (argc != 2) return 1;
    uint16_t port = std::stoi(argv[1]);
    Dict dict("./Dict.txt");
    auto func = bind(&Dict::Translate, &dict, std::placeholders::_1);
    std::shared_ptr<UdpServer> usr = std::make_shared<UdpServer>(func, port);
    usr->Init();
    usr->Start();
    return 0;
}